/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import com.google.common.base.Predicate;
/*     */ import com.google.common.base.Predicates;
/*     */ import java.awt.Toolkit;
/*     */ import java.awt.datatransfer.DataFlavor;
/*     */ import java.awt.datatransfer.StringSelection;
/*     */ import java.awt.datatransfer.Transferable;
/*     */ import java.lang.reflect.Field;
/*     */ import java.lang.reflect.Method;
/*     */ import java.util.List;
/*     */ import java.util.Locale;
/*     */ import java.util.Map;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.settings.GameSettings;
/*     */ import net.minecraft.client.settings.KeyBinding;
/*     */ import net.minecraft.entity.Entity;
/*     */ import net.minecraft.entity.EntityLivingBase;
/*     */ import net.minecraft.util.EntitySelectors;
/*     */ import net.minecraft.util.math.AxisAlignedBB;
/*     */ import net.minecraft.util.math.BlockPos;
/*     */ import net.minecraft.util.math.RayTraceResult;
/*     */ import net.minecraft.util.math.Vec3d;
/*     */ import net.minecraftforge.client.settings.KeyModifier;
/*     */ import net.minecraftforge.fml.relauncher.ReflectionHelper;
/*     */ import org.lwjgl.input.Keyboard;
/*     */ import org.lwjgl.input.Mouse;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class wf
/*     */ {
/*     */   @eos/moe/dragoncore/t(v = {"取滚轮值", "mouse_get_wheel"})
/*     */   public static int v() {
/*  42 */     int a = Mouse.getEventDWheel();
/*  43 */     return Integer.compare(a, 0);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取鼠标x", "Mouse_Get_X"})
/*     */   public static double z() {
/*  48 */     return sk.w;
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取鼠标y", "Mouse_Get_Y"})
/*     */   public static double v() {
/*  53 */     return sk.q;
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"设置剪切板", "Clipboard_Set"})
/*     */   public static void h(String a) {
/*     */     try {
/*  59 */       StringSelection stringSelection = new StringSelection(a);
/*  60 */       Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null);
/*  61 */     } catch (Exception exception) {}
/*     */   }
/*     */ 
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取剪切板", "Clipboard_Get"})
/*     */   public static String h(String a) {
/*     */     try {
/*  68 */       Transferable transferable = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
/*  69 */       if (transferable != null && transferable.isDataFlavorSupported(DataFlavor.stringFlavor)) {
/*  70 */         return (String)transferable.getTransferData(DataFlavor.stringFlavor);
/*     */       }
/*  72 */     } catch (Exception exception) {}
/*     */     
/*  74 */     return "";
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"键位是否按下", "Key_IsPress"})
/*     */   public static boolean v(vh a, String str) {
/* 108 */     if (a != null) {
/* 109 */       switch (str.toUpperCase(Locale.ROOT)) {
/*     */         case "MOUSE_LEFT":
/* 111 */           return (a.field_146287_f == 0);
/*     */         case "MOUSE_RIGHT":
/* 113 */           return (a.field_146287_f == 1);
/*     */         case "MOUSE_MIDDLE":
/* 115 */           return (a.field_146287_f == 2);
/*     */       } 
/*     */     
/*     */     }
/* 119 */     int i = Keyboard.getKeyIndex(str);
/* 120 */     return (i != 0 && Keyboard.isKeyDown(i));
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取当前按下键", "Key_Get_Press"})
/*     */   public static String v(vh a) {
/* 125 */     if (a == null)
/* 126 */       return ""; 
/* 127 */     return a.ka;
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"获取按键名", "Minecraft_Get_Key"})
/*     */   public static String z(String a) {
/* 132 */     Map map = (Map)ReflectionHelper.getPrivateValue(KeyBinding.class, null, new String[] { "KEYBIND_ARRAY", "field_74516_a" });
/* 133 */     KeyBinding keyBinding = (KeyBinding)map.get(a);
/* 134 */     if (keyBinding != null) {
/* 135 */       return Keyboard.getKeyName(keyBinding.func_151463_i());
/*     */     }
/* 137 */     return "";
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"获取按键额外", "Minecraft_Get_Key"})
/*     */   public static String v(String a) {
/* 142 */     Map map = (Map)ReflectionHelper.getPrivateValue(KeyBinding.class, null, new String[] { "KEYBIND_ARRAY", "field_74516_a" });
/* 143 */     KeyBinding keyBinding = (KeyBinding)map.get(a);
/* 144 */     if (keyBinding != null) {
/* 145 */       return keyBinding.getKeyModifier().name().toUpperCase(Locale.ROOT);
/*     */     }
/* 147 */     return "NONE";
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"设置按键", "Minecraft_Set_Key"})
/*     */   public static boolean v(String a, String str1, String str2) {
/* 152 */     GameSettings gameSettings = (Minecraft.func_71410_x()).field_71474_y;
/*     */     
/* 154 */     Map map = (Map)ReflectionHelper.getPrivateValue(KeyBinding.class, null, new String[] { "KEYBIND_ARRAY", "field_74516_a" });
/* 155 */     KeyBinding keyBinding = (KeyBinding)map.get(a);
/* 156 */     if (keyBinding != null) {
/* 157 */       int i = Keyboard.getKeyIndex(str2);
/* 158 */       if (i != 0 || str2.equals("NONE")) {
/*     */         try {
/* 160 */           KeyModifier keyModifier = KeyModifier.valueOf(str1.toUpperCase(Locale.ROOT));
/* 161 */           keyBinding.setKeyModifierAndCode(keyModifier, i);
/* 162 */           gameSettings.func_151440_a(keyBinding, i);
/* 163 */           KeyBinding.func_74508_b();
/* 164 */           return true;
/* 165 */         } catch (Exception exception) {}
/*     */       }
/*     */     } 
/*     */ 
/*     */     
/* 170 */     return false;
/*     */   }
/*     */ 
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"模拟按键", "Key_Press"})
/*     */   public static void v(String a, o o1) {
/* 176 */     if (o1 == null || o1 instanceof ie) {
/* 177 */       v(a, true);
/* 178 */       zg.g.execute(() -> {
/*     */             try {
/*     */               Thread.sleep(50L);
/*     */               Minecraft.func_71410_x().func_152344_a(());
/* 182 */             } catch (InterruptedException interruptedException) {
/*     */               interruptedException.printStackTrace();
/*     */             } 
/*     */           });
/*     */     } else {
/* 187 */       v(a, (o1.v() != 0.0D));
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取指针生物名", "Mouse_Entity_Name"})
/*     */   public static String z(o a, o o1) {
/* 291 */     RayTraceResult rayTraceResult = v(a, o1);
/* 292 */     if (rayTraceResult.field_72308_g != null) {
/* 293 */       return rayTraceResult.field_72308_g.func_145748_c_().func_150254_d();
/*     */     }
/* 295 */     return "";
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取指针生物UUID", "Mouse_Entity_UUID"})
/*     */   public static String v(o a, o o1) {
/* 300 */     RayTraceResult rayTraceResult = v(a, o1);
/* 301 */     if (rayTraceResult.field_72308_g != null) {
/* 302 */       return rayTraceResult.field_72308_g.func_110124_au().toString();
/*     */     }
/* 304 */     return "";
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取指针生物血量", "Mouse_Entity_Health"})
/*     */   public static double z(o a, o o1) {
/* 309 */     RayTraceResult rayTraceResult = v(a, o1);
/* 310 */     if (rayTraceResult.field_72308_g instanceof EntityLivingBase) {
/* 311 */       return ((EntityLivingBase)rayTraceResult.field_72308_g).func_110143_aJ();
/*     */     }
/* 313 */     return 0.0D;
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取指针生物最大血量", "Mouse_Entity_Max_Health"})
/*     */   public static double v(o a, o o1) {
/* 318 */     RayTraceResult rayTraceResult = v(a, o1);
/* 319 */     if (rayTraceResult.field_72308_g instanceof EntityLivingBase) {
/* 320 */       return ((EntityLivingBase)rayTraceResult.field_72308_g).func_110138_aP();
/*     */     }
/* 322 */     return 0.0D;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\wf.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */